home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / othell1a / main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-11  |  29.9 KB  |  1,010 lines

  1. VERSION 5.00
  2. Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H8000000A&
  5.    Caption         =   "Othello 1.0"
  6.    ClientHeight    =   6210
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   6975
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   6210
  12.    ScaleWidth      =   6975
  13.    StartUpPosition =   2  'CenterScreen
  14.    Begin VB.Timer Timer1 
  15.       Interval        =   1000
  16.       Left            =   6240
  17.       Top             =   5280
  18.    End
  19.    Begin MSWinsockLib.Winsock Winsock1 
  20.       Left            =   5520
  21.       Top             =   5400
  22.       _ExtentX        =   741
  23.       _ExtentY        =   741
  24.    End
  25.    Begin VB.CommandButton Command3 
  26.       Caption         =   "&End"
  27.       BeginProperty Font 
  28.          Name            =   "Arial"
  29.          Size            =   9.75
  30.          Charset         =   0
  31.          Weight          =   700
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   495
  37.       Left            =   5280
  38.       TabIndex        =   4
  39.       Top             =   1920
  40.       Width           =   1455
  41.    End
  42.    Begin VB.CommandButton Command2 
  43.       Caption         =   "&Config"
  44.       BeginProperty Font 
  45.          Name            =   "Arial"
  46.          Size            =   9.75
  47.          Charset         =   0
  48.          Weight          =   700
  49.          Underline       =   0   'False
  50.          Italic          =   0   'False
  51.          Strikethrough   =   0   'False
  52.       EndProperty
  53.       Height          =   495
  54.       Left            =   5280
  55.       TabIndex        =   2
  56.       Top             =   720
  57.       Width           =   1455
  58.    End
  59.    Begin VB.CommandButton Command4 
  60.       Caption         =   "Next Player"
  61.       BeginProperty Font 
  62.          Name            =   "Arial"
  63.          Size            =   9.75
  64.          Charset         =   0
  65.          Weight          =   700
  66.          Underline       =   0   'False
  67.          Italic          =   0   'False
  68.          Strikethrough   =   0   'False
  69.       EndProperty
  70.       Height          =   495
  71.       Left            =   5280
  72.       TabIndex        =   1
  73.       Top             =   2760
  74.       Width           =   1455
  75.    End
  76.    Begin VB.CommandButton Command1 
  77.       Caption         =   "&Start"
  78.       BeginProperty Font 
  79.          Name            =   "Arial"
  80.          Size            =   9.75
  81.          Charset         =   0
  82.          Weight          =   700
  83.          Underline       =   0   'False
  84.          Italic          =   0   'False
  85.          Strikethrough   =   0   'False
  86.       EndProperty
  87.       Height          =   495
  88.       Left            =   5280
  89.       TabIndex        =   0
  90.       Top             =   1320
  91.       Width           =   1455
  92.    End
  93.    Begin VB.Label status 
  94.       BeginProperty Font 
  95.          Name            =   "Arial"
  96.          Size            =   9.75
  97.          Charset         =   0
  98.          Weight          =   700
  99.          Underline       =   0   'False
  100.          Italic          =   0   'False
  101.          Strikethrough   =   0   'False
  102.       EndProperty
  103.       Height          =   255
  104.       Left            =   120
  105.       TabIndex        =   9
  106.       Top             =   5760
  107.       Width           =   1695
  108.    End
  109.    Begin VB.Label swhite 
  110.       Alignment       =   2  'Center
  111.       Caption         =   "2"
  112.       BeginProperty Font 
  113.          Name            =   "Arial"
  114.          Size            =   9.75
  115.          Charset         =   0
  116.          Weight          =   700
  117.          Underline       =   0   'False
  118.          Italic          =   0   'False
  119.          Strikethrough   =   0   'False
  120.       EndProperty
  121.       Height          =   255
  122.       Left            =   5160
  123.       TabIndex        =   8
  124.       Top             =   3720
  125.       Width           =   1695
  126.    End
  127.    Begin VB.Label lblBlack 
  128.       Alignment       =   2  'Center
  129.       Caption         =   "Black"
  130.       BeginProperty Font 
  131.          Name            =   "Arial"
  132.          Size            =   9.75
  133.          Charset         =   0
  134.          Weight          =   700
  135.          Underline       =   0   'False
  136.          Italic          =   0   'False
  137.          Strikethrough   =   0   'False
  138.       EndProperty
  139.       Height          =   255
  140.       Left            =   5160
  141.       TabIndex        =   7
  142.       Top             =   4200
  143.       Width           =   1695
  144.    End
  145.    Begin VB.Label sblack 
  146.       Alignment       =   2  'Center
  147.       Caption         =   "2"
  148.       BeginProperty Font 
  149.          Name            =   "Arial"
  150.          Size            =   9.75
  151.          Charset         =   0
  152.          Weight          =   700
  153.          Underline       =   0   'False
  154.          Italic          =   0   'False
  155.          Strikethrough   =   0   'False
  156.       EndProperty
  157.       Height          =   255
  158.       Left            =   5160
  159.       TabIndex        =   6
  160.       Top             =   4440
  161.       Width           =   1695
  162.    End
  163.    Begin VB.Label lblWhite 
  164.       Alignment       =   2  'Center
  165.       Caption         =   "White"
  166.       BeginProperty Font 
  167.          Name            =   "Arial"
  168.          Size            =   9.75
  169.          Charset         =   0
  170.          Weight          =   700
  171.          Underline       =   0   'False
  172.          Italic          =   0   'False
  173.          Strikethrough   =   0   'False
  174.       EndProperty
  175.       Height          =   255
  176.       Left            =   5160
  177.       TabIndex        =   5
  178.       Top             =   3480
  179.       Width           =   1695
  180.    End
  181.    Begin VB.Image Image1 
  182.       BorderStyle     =   1  'Fixed Single
  183.       Height          =   615
  184.       Index           =   36
  185.       Left            =   2040
  186.       Top             =   3120
  187.       Width           =   615
  188.    End
  189.    Begin VB.Image Image1 
  190.       BorderStyle     =   1  'Fixed Single
  191.       Height          =   615
  192.       Index           =   46
  193.       Left            =   3240
  194.       Top             =   3720
  195.       Width           =   615
  196.    End
  197.    Begin VB.Label lblPlayer 
  198.       Alignment       =   2  'Center
  199.       Caption         =   "PUSH START"
  200.       BeginProperty Font 
  201.          Name            =   "Arial"
  202.          Size            =   15.75
  203.          Charset         =   0
  204.          Weight          =   700
  205.          Underline       =   0   'False
  206.          Italic          =   -1  'True
  207.          Strikethrough   =   0   'False
  208.       EndProperty
  209.       Height          =   375
  210.       Left            =   0
  211.       TabIndex        =   3
  212.       Top             =   120
  213.       Width           =   6975
  214.    End
  215.    Begin VB.Image Image1 
  216.       BorderStyle     =   1  'Fixed Single
  217.       Height          =   615
  218.       Index           =   64
  219.       Left            =   4440
  220.       Top             =   4920
  221.       Width           =   615
  222.    End
  223.    Begin VB.Image Image1 
  224.       BorderStyle     =   1  'Fixed Single
  225.       Height          =   615
  226.       Index           =   63
  227.       Left            =   3840
  228.       Top             =   4920
  229.       Width           =   615
  230.    End
  231.    Begin VB.Image Image1 
  232.       BorderStyle     =   1  'Fixed Single
  233.       Height          =   615
  234.       Index           =   62
  235.       Left            =   3240
  236.       Top             =   4920
  237.       Width           =   615
  238.    End
  239.    Begin VB.Image Image1 
  240.       BorderStyle     =   1  'Fixed Single
  241.       Height          =   615
  242.       Index           =   61
  243.       Left            =   2640
  244.       Top             =   4920
  245.       Width           =   615
  246.    End
  247.    Begin VB.Image Image1 
  248.       BorderStyle     =   1  'Fixed Single
  249.       Height          =   615
  250.       Index           =   60
  251.       Left            =   2040
  252.       Top             =   4920
  253.       Width           =   615
  254.    End
  255.    Begin VB.Image Image1 
  256.       BorderStyle     =   1  'Fixed Single
  257.       Height          =   615
  258.       Index           =   59
  259.       Left            =   1440
  260.       Top             =   4920
  261.       Width           =   615
  262.    End
  263.    Begin VB.Image Image1 
  264.       BorderStyle     =   1  'Fixed Single
  265.       Height          =   615
  266.       Index           =   58
  267.       Left            =   840
  268.       Top             =   4920
  269.       Width           =   615
  270.    End
  271.    Begin VB.Image Image1 
  272.       BorderStyle     =   1  'Fixed Single
  273.       Height          =   615
  274.       Index           =   57
  275.       Left            =   240
  276.       Top             =   4920
  277.       Width           =   615
  278.    End
  279.    Begin VB.Image Image1 
  280.       BorderStyle     =   1  'Fixed Single
  281.       Height          =   615
  282.       Index           =   56
  283.       Left            =   4440
  284.       Top             =   4320
  285.       Width           =   615
  286.    End
  287.    Begin VB.Image Image1 
  288.       BorderStyle     =   1  'Fixed Single
  289.       Height          =   615
  290.       Index           =   55
  291.       Left            =   3840
  292.       Top             =   4320
  293.       Width           =   615
  294.    End
  295.    Begin VB.Image Image1 
  296.       BorderStyle     =   1  'Fixed Single
  297.       Height          =   615
  298.       Index           =   54
  299.       Left            =   3240
  300.       Top             =   4320
  301.       Width           =   615
  302.    End
  303.    Begin VB.Image Image1 
  304.       BorderStyle     =   1  'Fixed Single
  305.       Height          =   615
  306.       Index           =   53
  307.       Left            =   2640
  308.       Top             =   4320
  309.       Width           =   615
  310.    End
  311.    Begin VB.Image Image1 
  312.       BorderStyle     =   1  'Fixed Single
  313.       Height          =   615
  314.       Index           =   52
  315.       Left            =   2040
  316.       Top             =   4320
  317.       Width           =   615
  318.    End
  319.    Begin VB.Image Image1 
  320.       BorderStyle     =   1  'Fixed Single
  321.       Height          =   615
  322.       Index           =   51
  323.       Left            =   1440
  324.       Top             =   4320
  325.       Width           =   615
  326.    End
  327.    Begin VB.Image Image1 
  328.       BorderStyle     =   1  'Fixed Single
  329.       Height          =   615
  330.       Index           =   50
  331.       Left            =   840
  332.       Top             =   4320
  333.       Width           =   615
  334.    End
  335.    Begin VB.Image Image1 
  336.       BorderStyle     =   1  'Fixed Single
  337.       Height          =   615
  338.       Index           =   49
  339.       Left            =   240
  340.       Top             =   4320
  341.       Width           =   615
  342.    End
  343.    Begin VB.Image Image1 
  344.       BorderStyle     =   1  'Fixed Single
  345.       Height          =   615
  346.       Index           =   48
  347.       Left            =   4440
  348.       Top             =   3720
  349.       Width           =   615
  350.    End
  351.    Begin VB.Image Image1 
  352.       BorderStyle     =   1  'Fixed Single
  353.       Height          =   615
  354.       Index           =   47
  355.       Left            =   3840
  356.       Top             =   3720
  357.       Width           =   615
  358.    End
  359.    Begin VB.Image Image1 
  360.       BorderStyle     =   1  'Fixed Single
  361.       Height          =   615
  362.       Index           =   45
  363.       Left            =   2640
  364.       Top             =   3720
  365.       Width           =   615
  366.    End
  367.    Begin VB.Image Image1 
  368.       BorderStyle     =   1  'Fixed Single
  369.       Height          =   615
  370.       Index           =   44
  371.       Left            =   2040
  372.       Top             =   3720
  373.       Width           =   615
  374.    End
  375.    Begin VB.Image Image1 
  376.       BorderStyle     =   1  'Fixed Single
  377.       Height          =   615
  378.       Index           =   43
  379.       Left            =   1440
  380.       Top             =   3720
  381.       Width           =   615
  382.    End
  383.    Begin VB.Image Image1 
  384.       BorderStyle     =   1  'Fixed Single
  385.       Height          =   615
  386.       Index           =   42
  387.       Left            =   840
  388.       Top             =   3720
  389.       Width           =   615
  390.    End
  391.    Begin VB.Image Image1 
  392.       BorderStyle     =   1  'Fixed Single
  393.       Height          =   615
  394.       Index           =   41
  395.       Left            =   240
  396.       Top             =   3720
  397.       Width           =   615
  398.    End
  399.    Begin VB.Image Image1 
  400.       BorderStyle     =   1  'Fixed Single
  401.       Height          =   615
  402.       Index           =   40
  403.       Left            =   4440
  404.       Top             =   3120
  405.       Width           =   615
  406.    End
  407.    Begin VB.Image Image1 
  408.       BorderStyle     =   1  'Fixed Single
  409.       Height          =   615
  410.       Index           =   39
  411.       Left            =   3840
  412.       Top             =   3120
  413.       Width           =   615
  414.    End
  415.    Begin VB.Image Image1 
  416.       BorderStyle     =   1  'Fixed Single
  417.       Height          =   615
  418.       Index           =   38
  419.       Left            =   3240
  420.       Top             =   3120
  421.       Width           =   615
  422.    End
  423.    Begin VB.Image Image1 
  424.       BorderStyle     =   1  'Fixed Single
  425.       Height          =   615
  426.       Index           =   37
  427.       Left            =   2640
  428.       Top             =   3120
  429.       Width           =   615
  430.    End
  431.    Begin VB.Image Image1 
  432.       BorderStyle     =   1  'Fixed Single
  433.       Height          =   615
  434.       Index           =   35
  435.       Left            =   1440
  436.       Top             =   3120
  437.       Width           =   615
  438.    End
  439.    Begin VB.Image Image1 
  440.       BorderStyle     =   1  'Fixed Single
  441.       Height          =   615
  442.       Index           =   34
  443.       Left            =   840
  444.       Top             =   3120
  445.       Width           =   615
  446.    End
  447.    Begin VB.Image Image1 
  448.       BorderStyle     =   1  'Fixed Single
  449.       Height          =   615
  450.       Index           =   33
  451.       Left            =   240
  452.       Top             =   3120
  453.       Width           =   615
  454.    End
  455.    Begin VB.Image Image1 
  456.       BorderStyle     =   1  'Fixed Single
  457.       Height          =   615
  458.       Index           =   32
  459.       Left            =   4440
  460.       Top             =   2520
  461.       Width           =   615
  462.    End
  463.    Begin VB.Image Image1 
  464.       BorderStyle     =   1  'Fixed Single
  465.       Height          =   615
  466.       Index           =   31
  467.       Left            =   3840
  468.       Top             =   2520
  469.       Width           =   615
  470.    End
  471.    Begin VB.Image Image1 
  472.       BorderStyle     =   1  'Fixed Single
  473.       Height          =   615
  474.       Index           =   30
  475.       Left            =   3240
  476.       Top             =   2520
  477.       Width           =   615
  478.    End
  479.    Begin VB.Image Image1 
  480.       BorderStyle     =   1  'Fixed Single
  481.       Height          =   615
  482.       Index           =   29
  483.       Left            =   2640
  484.       Top             =   2520
  485.       Width           =   615
  486.    End
  487.    Begin VB.Image Image1 
  488.       BorderStyle     =   1  'Fixed Single
  489.       Height          =   615
  490.       Index           =   28
  491.       Left            =   2040
  492.       Top             =   2520
  493.       Width           =   615
  494.    End
  495.    Begin VB.Image Image1 
  496.       BorderStyle     =   1  'Fixed Single
  497.       Height          =   615
  498.       Index           =   27
  499.       Left            =   1440
  500.       Top             =   2520
  501.       Width           =   615
  502.    End
  503.    Begin VB.Image Image1 
  504.       BorderStyle     =   1  'Fixed Single
  505.       Height          =   615
  506.       Index           =   26
  507.       Left            =   840
  508.       Top             =   2520
  509.       Width           =   615
  510.    End
  511.    Begin VB.Image Image1 
  512.       BorderStyle     =   1  'Fixed Single
  513.       Height          =   615
  514.       Index           =   25
  515.       Left            =   240
  516.       Top             =   2520
  517.       Width           =   615
  518.    End
  519.    Begin VB.Image Image1 
  520.       BorderStyle     =   1  'Fixed Single
  521.       Height          =   615
  522.       Index           =   24
  523.       Left            =   4440
  524.       Top             =   1920
  525.       Width           =   615
  526.    End
  527.    Begin VB.Image Image1 
  528.       BorderStyle     =   1  'Fixed Single
  529.       Height          =   615
  530.       Index           =   23
  531.       Left            =   3840
  532.       Top             =   1920
  533.       Width           =   615
  534.    End
  535.    Begin VB.Image Image1 
  536.       BorderStyle     =   1  'Fixed Single
  537.       Height          =   615
  538.       Index           =   22
  539.       Left            =   3240
  540.       Top             =   1920
  541.       Width           =   615
  542.    End
  543.    Begin VB.Image Image1 
  544.       BorderStyle     =   1  'Fixed Single
  545.       Height          =   615
  546.       Index           =   21
  547.       Left            =   2640
  548.       Top             =   1920
  549.       Width           =   615
  550.    End
  551.    Begin VB.Image Image1 
  552.       BorderStyle     =   1  'Fixed Single
  553.       Height          =   615
  554.       Index           =   20
  555.       Left            =   2040
  556.       Top             =   1920
  557.       Width           =   615
  558.    End
  559.    Begin VB.Image Image1 
  560.       BorderStyle     =   1  'Fixed Single
  561.       Height          =   615
  562.       Index           =   19
  563.       Left            =   1440
  564.       Top             =   1920
  565.       Width           =   615
  566.    End
  567.    Begin VB.Image Image1 
  568.       BorderStyle     =   1  'Fixed Single
  569.       Height          =   615
  570.       Index           =   18
  571.       Left            =   840
  572.       Top             =   1920
  573.       Width           =   615
  574.    End
  575.    Begin VB.Image Image1 
  576.       BorderStyle     =   1  'Fixed Single
  577.       Height          =   615
  578.       Index           =   17
  579.       Left            =   240
  580.       Top             =   1920
  581.       Width           =   615
  582.    End
  583.    Begin VB.Image Image1 
  584.       BorderStyle     =   1  'Fixed Single
  585.       Height          =   615
  586.       Index           =   16
  587.       Left            =   4440
  588.       Top             =   1320
  589.       Width           =   615
  590.    End
  591.    Begin VB.Image Image1 
  592.       BorderStyle     =   1  'Fixed Single
  593.       Height          =   615
  594.       Index           =   15
  595.       Left            =   3840
  596.       Top             =   1320
  597.       Width           =   615
  598.    End
  599.    Begin VB.Image Image1 
  600.       BorderStyle     =   1  'Fixed Single
  601.       Height          =   615
  602.       Index           =   14
  603.       Left            =   3240
  604.       Top             =   1320
  605.       Width           =   615
  606.    End
  607.    Begin VB.Image Image1 
  608.       BorderStyle     =   1  'Fixed Single
  609.       Height          =   615
  610.       Index           =   13
  611.       Left            =   2640
  612.       Top             =   1320
  613.       Width           =   615
  614.    End
  615.    Begin VB.Image Image1 
  616.       BorderStyle     =   1  'Fixed Single
  617.       Height          =   615
  618.       Index           =   12
  619.       Left            =   2040
  620.       Top             =   1320
  621.       Width           =   615
  622.    End
  623.    Begin VB.Image Image1 
  624.       BorderStyle     =   1  'Fixed Single
  625.       Height          =   615
  626.       Index           =   11
  627.       Left            =   1440
  628.       Top             =   1320
  629.       Width           =   615
  630.    End
  631.    Begin VB.Image Image1 
  632.       BorderStyle     =   1  'Fixed Single
  633.       Height          =   615
  634.       Index           =   10
  635.       Left            =   840
  636.       Top             =   1320
  637.       Width           =   615
  638.    End
  639.    Begin VB.Image Image1 
  640.       BorderStyle     =   1  'Fixed Single
  641.       Height          =   615
  642.       Index           =   9
  643.       Left            =   240
  644.       Top             =   1320
  645.       Width           =   615
  646.    End
  647.    Begin VB.Image Image1 
  648.       BorderStyle     =   1  'Fixed Single
  649.       Height          =   615
  650.       Index           =   8
  651.       Left            =   4440
  652.       Top             =   720
  653.       Width           =   615
  654.    End
  655.    Begin VB.Image Image1 
  656.       BorderStyle     =   1  'Fixed Single
  657.       Height          =   615
  658.       Index           =   7
  659.       Left            =   3840
  660.       Top             =   720
  661.       Width           =   615
  662.    End
  663.    Begin VB.Image Image1 
  664.       BorderStyle     =   1  'Fixed Single
  665.       Height          =   615
  666.       Index           =   6
  667.       Left            =   3240
  668.       Top             =   720
  669.       Width           =   615
  670.    End
  671.    Begin VB.Image Image1 
  672.       BorderStyle     =   1  'Fixed Single
  673.       Height          =   615
  674.       Index           =   5
  675.       Left            =   2640
  676.       Top             =   720
  677.       Width           =   615
  678.    End
  679.    Begin VB.Image Image1 
  680.       BorderStyle     =   1  'Fixed Single
  681.       Height          =   615
  682.       Index           =   4
  683.       Left            =   2040
  684.       Top             =   720
  685.       Width           =   615
  686.    End
  687.    Begin VB.Image Image1 
  688.       BorderStyle     =   1  'Fixed Single
  689.       Height          =   615
  690.       Index           =   3
  691.       Left            =   1440
  692.       Top             =   720
  693.       Width           =   615
  694.    End
  695.    Begin VB.Image Image1 
  696.       BorderStyle     =   1  'Fixed Single
  697.       Height          =   615
  698.       Index           =   2
  699.       Left            =   840
  700.       Top             =   720
  701.       Width           =   615
  702.    End
  703.    Begin VB.Image Image1 
  704.       BorderStyle     =   1  'Fixed Single
  705.       Height          =   615
  706.       Index           =   1
  707.       Left            =   240
  708.       Top             =   720
  709.       Width           =   615
  710.    End
  711. Attribute VB_Name = "Form1"
  712. Attribute VB_GlobalNameSpace = False
  713. Attribute VB_Creatable = False
  714. Attribute VB_PredeclaredId = True
  715. Attribute VB_Exposed = False
  716. Dim Bjoueur As Boolean
  717. Dim tmppicture(255) As Integer
  718. Dim TmpFindOK As Boolean
  719. Dim TmpFindTmp As Boolean
  720. Dim tmpNextPlayer As Boolean
  721. Dim Start As Boolean
  722. Private Sub Pts()
  723. bscore = 0
  724. wscore = 0
  725.     For X = 1 To 64
  726.         If tmppicture(X) = 1 Then bscore = bscore + 1
  727.         If tmppicture(X) = 2 Then wscore = wscore + 1
  728.     Next
  729.     sblack.Caption = bscore
  730.     swhite.Caption = wscore
  731. End Sub
  732. Private Sub Joute(pos As Integer)
  733. Select Case pos
  734.     Case 9, 17, 25, 33, 41, 49:
  735.         Call FindCenter(pos, -8)
  736.         Call Pitoune(pos)
  737.         TmpFindOK = False
  738.         TmpFindTmp = False
  739.         Call FindCenter(pos, -7)
  740.         Call Pitoune(pos)
  741.         TmpFindOK = False
  742.         TmpFindTmp = False
  743.         Call FindCenter(pos, 1)
  744.         Call Pitoune(pos)
  745.         TmpFindOK = False
  746.         TmpFindTmp = False
  747.         Call FindCenter(pos, 8)
  748.         Call Pitoune(pos)
  749.         TmpFindOK = False
  750.         TmpFindTmp = False
  751.         Call FindCenter(pos, 9)
  752.         Call Pitoune(pos)
  753.         TmpFindOK = False
  754.         TmpFindTmp = False
  755.         If tmpNextPlayer = True Then
  756.             tmpNextPlayer = False
  757.             Bjoueur = Not Bjoueur
  758.             Call Pts
  759.             If Bjoueur = True Then
  760.                 lblPlayer.Caption = Form2.txtBlack & " to play"
  761.             Else: lblPlayer.Caption = Form2.txtWhite & " to play"
  762.             End If
  763.         Else: MsgBox "Jeux Impossible"
  764.         End If
  765.     ''=-=-=-=-=-=-=-=-=-=-=-=-=
  766.     Case 16, 24, 32, 40, 48, 56:
  767.         TmpFindOK = False
  768.         TmpFindTmp = False
  769.         Call FindCenter(pos, -9)
  770.         Call Pitoune(pos)
  771.         TmpFindOK = False
  772.         TmpFindTmp = False
  773.         Call FindCenter(pos, -8)
  774.         Call Pitoune(pos)
  775.         TmpFindOK = False
  776.         TmpFindTmp = False
  777.         Call FindCenter(pos, -1)
  778.         Call Pitoune(pos)
  779.         TmpFindOK = False
  780.         TmpFindTmp = False
  781.         Call FindCenter(pos, 7)
  782.         Call Pitoune(pos)
  783.         TmpFindOK = False
  784.         TmpFindTmp = False
  785.         Call FindCenter(pos, 8)
  786.         Call Pitoune(pos)
  787.         TmpFindOK = False
  788.         TmpFindTmp = False
  789.         If tmpNextPlayer = True Then
  790.             tmpNextPlayer = False
  791.             Bjoueur = Not Bjoueur
  792.             Call Pts
  793.             If Bjoueur = True Then
  794.                 lblPlayer.Caption = Form2.txtBlack & " to play"
  795.             Else: lblPlayer.Caption = Form2.txtWhite & " to play"
  796.             End If
  797.         Else: MsgBox "Jeux Impossible"
  798.         End If
  799.     ''=-=-=-=-=-=-=-=-=-=-=-=-=
  800.     Case Else
  801.         TmpFindOK = False
  802.         TmpFindTmp = False
  803.         Call FindCenter(pos, -9)
  804.         Call Pitoune(pos)
  805.         TmpFindOK = False
  806.         TmpFindTmp = False
  807.         Call FindCenter(pos, -8)
  808.         Call Pitoune(pos)
  809.         TmpFindOK = False
  810.         TmpFindTmp = False
  811.         Call FindCenter(pos, -7)
  812.         Call Pitoune(pos)
  813.         TmpFindOK = False
  814.         TmpFindTmp = False
  815.         Call FindCenter(pos, -1)
  816.         Call Pitoune(pos)
  817.         TmpFindOK = False
  818.         TmpFindTmp = False
  819.         Call FindCenter(pos, 1)
  820.         Call Pitoune(pos)
  821.         TmpFindOK = False
  822.         TmpFindTmp = False
  823.         Call FindCenter(pos, 7)
  824.         Call Pitoune(pos)
  825.         TmpFindOK = False
  826.         TmpFindTmp = False
  827.         Call FindCenter(pos, 8)
  828.         Call Pitoune(pos)
  829.         TmpFindOK = False
  830.         TmpFindTmp = False
  831.         Call FindCenter(pos, 9)
  832.         Call Pitoune(pos)
  833.         TmpFindOK = False
  834.         TmpFindTmp = False
  835.         If tmpNextPlayer = True Then
  836.             Call Pts
  837.             tmpNextPlayer = False
  838.             Bjoueur = Not Bjoueur
  839.             If Bjoueur = True Then
  840.                 lblPlayer.Caption = Form2.txtBlack & " to play"
  841.             Else: lblPlayer.Caption = Form2.txtWhite & " to play"
  842.             End If
  843.         Else: MsgBox "Jeux Impossible"
  844.         End If
  845. End Select
  846. End Sub
  847. Private Sub Pitoune(pos)
  848.     If TmpFindOK = True Then
  849.         If Bjoueur = False Then
  850.             Image1(pos).Picture = LoadPicture(App.Path & "\blanc.bmp")
  851.             tmppicture(pos) = 2
  852.         Else
  853.             Image1(pos).Picture = LoadPicture(App.Path & "\noir.bmp")
  854.             tmppicture(pos) = 1
  855.         End If
  856.         tmpNextPlayer = True
  857.     End If
  858. End Sub
  859. Private Sub FindCenter(pos As Integer, Mode As Single)
  860. Dim TmpFind As Integer
  861. TmpFind = pos + Mode
  862. If Bjoueur = True Then
  863.     tmpimage = 2
  864. Else: tmpimage = 1
  865. End If
  866. If tmppicture(TmpFind) = tmpimage Then
  867.     TmpFindTmp = True
  868.     Call FindCenter(TmpFind, Mode)
  869.     If tmppicture(TmpFind) <> 0 And TmpFindTmp = True Then
  870.         TmpFindOK = True
  871.     End If
  872. End If
  873.     If TmpFindOK = True Then
  874.         If tmpimage = 1 Then
  875.             Image1(TmpFind).Picture = LoadPicture(App.Path & "\blanc.bmp")
  876.             tmppicture(TmpFind) = 2
  877.         Else
  878.             Image1(TmpFind).Picture = LoadPicture(App.Path & "\noir.bmp")
  879.             tmppicture(TmpFind) = 1
  880.         End If
  881.         
  882.     End If
  883. End Sub
  884. Private Sub Command1_Click()
  885. If Start = False Then
  886.     Start = True
  887.     lblPlayer.Caption = Form2.txtWhite & " to play"
  888.     Call SubStart
  889. Else: MsgBox "Game already started!"
  890. End If
  891. End Sub
  892. Private Sub Command2_Click()
  893. Form2.Show
  894. End Sub
  895. Private Sub Command3_Click()
  896. If Start = True Then
  897.     ok = MsgBox("Do you realy want to end the game", vbYesNo, "End!")
  898.     If ok = 6 Then
  899.         Start = False
  900.         
  901.         bscore = 0
  902.         wscore = 0
  903.         
  904.         For X = 1 To 64
  905.         Image1(X).Picture = LoadPicture("")
  906.         Next
  907.         
  908.         For X = 1 To 64
  909.             If tmppicture(X) = 1 Then bscore = bscore + 1
  910.             If tmppicture(X) = 2 Then wscore = wscore + 1
  911.         Next
  912.         If bscore > wscore Then
  913.             lblPlayer.Caption = Form2.txtBlack.Text & " Win!!!!!"
  914.             For X = 1 To bscore
  915.                 Image1(X).Picture = LoadPicture(App.Path & "\noir.bmp")
  916.             Next
  917.             For X = bscore + 1 To wscore + bscore
  918.                 Image1(X).Picture = LoadPicture(App.Path & "\blanc.bmp")
  919.             Next
  920.         Else
  921.             lblPlayer.Caption = Form2.txtWhite.Text & " Win!!!!!"
  922.             For X = 1 To wscore
  923.                 Image1(X).Picture = LoadPicture(App.Path & "\blanc.bmp")
  924.             Next
  925.             For X = wscore + 1 To bscore + wscore
  926.                 Image1(X).Picture = LoadPicture(App.Path & "\noir.bmp")
  927.             Next
  928.         End If
  929.         If bscore = wscore Then lblPlayer.Caption = "Draw Game!!!!!"
  930.     End If
  931. End If
  932. End Sub
  933. Private Sub Command4_Click()
  934. ok = MsgBox("It is impossible to make move!", vbYesNo, "Warning!")
  935. If ok = 6 Then
  936.     Bjoueur = Not Bjoueur
  937.     If Bjoueur = True Then
  938.         lblPlayer.Caption = Form2.txtBlack & " to play"
  939.     Else: lblPlayer.Caption = Form2.txtWhite & " to play"
  940.     End If
  941. End If
  942. End Sub
  943. Private Sub SubStart()
  944. TmpFindOK = False
  945. TmpFindTmp = False
  946. tmpNextPlayer = False
  947. For X = 1 To 64
  948.     tmppicture(X) = 0
  949.     Image1(X).Picture = LoadPicture("")
  950. tmppicture(36) = 1
  951. Image1(29).Picture = LoadPicture(App.Path & "\noir.bmp")
  952. tmppicture(37) = 2
  953. Image1(36).Picture = LoadPicture(App.Path & "\noir.bmp")
  954. tmppicture(28) = 2
  955. Image1(28).Picture = LoadPicture(App.Path & "\blanc.bmp")
  956. tmppicture(29) = 1
  957. Image1(37).Picture = LoadPicture(App.Path & "\blanc.bmp")
  958. Bjoueur = False
  959. End Sub
  960. Private Sub Form_Load()
  961. Start = False
  962. Call SubStart
  963. End Sub
  964. Private Sub Loadwinsock()
  965. IIp = 21
  966. Winsock1.Connect "205.237.57.195", IIp
  967. Select Case Winsock1.State
  968.     Case 0: status.Caption = "Closed"
  969.     Case 1: status.Caption = "Open"
  970.     Case 2: status.Caption = "Listening"
  971.     Case 3: status.Caption = "Pending"
  972.     Case 4: status.Caption = "Resolving host"
  973.     Case 5: status.Caption = "Host resolved"
  974.     Case 6: status.Caption = "Connecting"
  975.     Case 7: status.Caption = "Connected"
  976.     Case 8: status.Caption = "Peer Closing"
  977.     Case 9: status.Caption = "Error"
  978. End Select
  979. End Sub
  980. Private Sub Form_Unload(Cancel As Integer)
  981. End Sub
  982. Private Sub Image1_Click(Index As Integer)
  983.     If tmppicture(Index) = 0 And Start = True Then Call Joute(Index)
  984. End Sub
  985. Private Sub Inet1_StateChanged(ByVal State As Integer)
  986. End Sub
  987. Private Sub Timer1_Timer()
  988. Select Case Winsock1.State
  989.     Case 0: status.Caption = "Closed"
  990.     Case 1: status.Caption = "Open"
  991.     Case 2: status.Caption = "Listening"
  992.     Case 3: status.Caption = "Pending"
  993.     Case 4: status.Caption = "Resolving host"
  994.     Case 5: status.Caption = "Host resolved"
  995.     Case 6: status.Caption = "Connecting"
  996.     Case 7: status.Caption = "Connected"
  997.     Case 8: status.Caption = "Peer Closing"
  998.     Case 9: status.Caption = "Error"
  999. End Select
  1000. End Sub
  1001. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
  1002. Dim DData As String
  1003. Dim Strnick As String
  1004. Dim StrName As String
  1005. Dim StrEmail As String
  1006. Winsock1.GetData DData
  1007. '''''' Entree
  1008. If Mid(DData, 1, 2) = "*SS" Then Number = Val(Mid(DData, 3, Len(DData)))
  1009. End Sub
  1010.